<?php /* Smarty version Smarty-3.1.15, created on 2016-11-09 11:09:05
         compiled from "D:\projs\USBWebserver v8.6\root\snapshop_server\admin\include\template\snap\sys_config.tpl" */ ?>
<?php /*%%SmartyHeaderCode:22749581737641de1c4-36854442%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '5d728c0554b175f90ba46d2275a413b867c3679b' => 
    array (
      0 => 'D:\\projs\\USBWebserver v8.6\\root\\snapshop_server\\admin\\include\\template\\snap\\sys_config.tpl',
      1 => 1478660846,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '22749581737641de1c4-36854442',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.15',
  'unifunc' => 'content_581737641fd5c2_81740190',
  'variables' => 
  array (
    'osadmin_action_alert' => 0,
    'osadmin_quick_note' => 0,
    '_POST' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_581737641fd5c2_81740190')) {function content_581737641fd5c2_81740190($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("navibar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("sidebar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<!-- START 以上内容不需更改，保证该TPL页内的标签匹配即可 -->
<?php echo $_smarty_tpl->tpl_vars['osadmin_action_alert']->value;?>

<?php echo $_smarty_tpl->tpl_vars['osadmin_quick_note']->value;?>


<div class="well">
    <ul class="nav nav-tabs">
        <li class="active"><a href="#home" data-toggle="tab">团购店铺基本配置</a></li>
    </ul>

    <div id="myTabContent" class="tab-content">
        <div class="tab-pane active in" id="home">

            <form id="tab" method="post" action="">
                <label>公司名称</label>
                <input type="text" name="company_name" id="company_name" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['company_name'];?>
"
                       class="input-xlarge"
                       autofocus="true" placeholder="公司全称，不要超过30个字符">
                <label>頁面标题</label>
                <input type="text" name="title" id="title" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['title'];?>
" class="input-xlarge"
                       autofocus="true">
                <label>頁面关键词</label>
                <input type="text" name="keyword" id="keyword" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['keyword'];?>
" class="input-xlarge"
                       autofocus="true" placeholder="多个请用半角逗号隔开">
                <label>頁面描述</label>
                <textarea name="desc" rows="3" id="desc" class="input-xlarge"><?php echo $_smarty_tpl->tpl_vars['_POST']->value['desc'];?>
</textarea>
                <label>統計代碼</label>
                <textarea name="tj_code" id="tj_code" rows="3" class="input-xlarge"><?php echo $_smarty_tpl->tpl_vars['_POST']->value['tj_code'];?>
</textarea>

                <label>底部版权信息</label>
                <textarea name="copyright" id="copyright" rows="3" class="input-xlarge"><?php echo $_smarty_tpl->tpl_vars['_POST']->value['copyright'];?>
</textarea>

                <div class="btn-toolbar">
                    <button type="button" class="btn btn-primary" onclick="tijiao()"><strong>提交</strong></button>
                </div>
            </form>
        </div>
    </div>
</div>


<script>
    function htmlEncodeByRegExp(str) {
        var s = "";
        if (str.length == 0) return "";
        s = str.replace(/&/g, "&amp;");
        s = s.replace(/</g, "&lt;");
        s = s.replace(/>/g, "&gt;");
        s = s.replace(/ /g, "&nbsp;");
        s = s.replace(/\'/g, "&#39;");
        s = s.replace(/\"/g, "&quot;");
        return s;
    }


    function tijiao() {
        var c3;
        if ($("#tj_code").val()) {
            c3 = htmlEncodeByRegExp($("#tj_code").val());
        } else {
            c3 = '';
        }

        var title = $("#title").val();
        var company_name = $("#company_name").val();
        var keyword = $("#keyword").val();
        var desc = $("#desc").val();
        var copyright = $("#copyright").val();
        $.ajax({
            url: 'sys_config.php',// 跳转到 action
            data: {
                "title": title,
                "company_name": company_name,
                "keyword": keyword,
                "desc": desc,
                "copyright": copyright,
                "tj_code": c3
            },
            type: 'post',
            cache: false,
            dataType: 'json',
            success: function (ret) {
                if (ret.code == "0") {
                    alert("提交成功");
                    window.location.reload();
                } else {
                    alert("服務器錯誤");
                    return;
                }
            },
            error: function () {
                alert("服務器錯誤！");
            }
        });
    }
</script>


<!-- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 -->
<?php echo $_smarty_tpl->getSubTemplate ("footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
